package com.yang.xiao.listener;

import javax.servlet.ServletContainerInitializer;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import java.util.Set;

public class WebInitListener implements ServletContainerInitializer {
    @Override
    public void onStartup(Set<Class<?>> c, ServletContext ctx) throws ServletException {
      /*  ServletRegistration.Dynamic sr = ctx.addServlet("DispatcherServlet", DispatcherServlet.class);
        sr.addMapping("/*");
        FilterRegistration.Dynamic rf = ctx.addFilter("orderFilter", OrderFitler.class);
        EnumSet<DispatcherType> dispatcherTypes = EnumSet.allOf(DispatcherType.class);
        dispatcherTypes.add(DispatcherType.REQUEST);
        rf.addMappingForUrlPatterns(dispatcherTypes,false,"/*");
        ctx.setAttribute("controller","com.yang.xiao.hui.Controller");*/


    }
}
